<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<%@ page import="support.*, java.util.*" %>

<h1>Your Information</h1>
<table>
<%

	Applicant applicant = (Applicant) session.getAttribute("applicant");
	Name name = null;
	Country citizenship = null;
	Country residence = null;
	Address address = null;
	Specialization specialization = null;
	
	if (applicant != null){
		name = applicant.getName();
		citizenship = applicant.getCitizenship();
		residence = applicant.getResidence();
		address = applicant.getAddress();
		specialization = applicant.getSpecialization();
	}
	
	if (name != null){
		%>
		<tr>
			<td><b>Name</b></td>
			<td><%= name.getFirst() %> <%= name.getLast() %> <%= name.getMid() %> </td>
		</tr>
		<%
	}
	if (citizenship != null){
		%>
		<tr>
			<td><b>Citizenship</b></td>
			<td><%= citizenship.getName() %></td>
		</tr>
		<%
	}
	if (residence != null){
		%>
		<tr>
			<td><b>Residence</b></td>
			<td><%= residence.getName() %></td>
		</tr>
		<%
	}
	if (address != null){
		%>
		<tr>
			<td><b>Address</b></td>
			<td>
				<%= address.getStreet() + " " + address.getCity() + " " + address.getState() + " " + address.getZipcode() %>
			</td>
		</tr>
		<tr>
			<td><b>Phone</b></td>
			<td>
				<%= address.getCountrycode() + " " + address.getAreacode() + " " + address.getPhone() %>
			</td>
		</tr>
		<%
	}
	if (specialization != null){
		%>
		<tr>
			<td><b>Specialization</b></td>
			<td><%= specialization.getName() %></td>
		</tr>
		<%
	}
%>
</table>